//
//  QQStyleQRScanViewController.h
//
//  github:https://github.com/MxABC/FCQRScan
//  Created by FCQRia on 15/10/21.
//  Copyright © 2015年 FCQRia. All rights reserved.
//

#import <TMSDK/TMSDK.h>
#import <Foundation/Foundation.h>

/**
 扫码结果delegate,也可通过继承本控制器，override方法scanResultWithArray即可
 */
@protocol FCQRScanViewControllerDelegate <NSObject>
@optional
- (void)scanResultWithArray:(NSArray *)array;
@end

@class FCQRScanView,FCQRScanViewStyle;
@class FCQRScanNative;
@interface FCQRScanViewController : TMViewController<UIImagePickerControllerDelegate,UINavigationControllerDelegate>


#pragma mark ---- 需要初始化参数 ------

//扫码结果委托，另外一种方案是通过继承本控制器，override方法scanResultWithArray即可
@property (nonatomic, weak) id<FCQRScanViewControllerDelegate> delegate;


/**
 @brief 是否需要扫码图像
 */
@property (nonatomic, assign) BOOL isNeedScanImage;


/**
 @brief  启动区域识别功能，ZBar暂不支持
 */
@property(nonatomic,assign) BOOL isOpenInterestRect;


/**
 相机启动提示,如 相机启动中...
 */
@property (nonatomic, copy) NSString *cameraInvokeMsg;

/**
 *  界面效果参数
 */
@property (nonatomic, strong) FCQRScanViewStyle *style;


#pragma mark -----  扫码使用的库对象 -------

/**
 @brief  扫码功能封装对象
 */
@property (nonatomic,strong) FCQRScanNative* scanObj;



#pragma mark - 扫码界面效果及提示等
/**
 @brief  扫码区域视图,二维码一般都是框
 */

@property (nonatomic,strong) FCQRScanView* qRScanView;


/**
 @brief  扫码存储的当前图片
 */
@property(nonatomic,strong) UIImage* scanImage;


/**
 @brief  闪关灯开启状态记录
 */
@property(nonatomic,assign) BOOL isOpenFlash;

//打开相册
- (void)openLocalPhoto:(BOOL)allowsEditing;

//开关闪光灯
- (void)openOrCloseFlash;

//启动扫描
- (void)reStartDevice;

//关闭扫描
- (void)stopScan;


@end
